<h3>All Notification</h3>
<div class="row-fluid">
	<div class="" >
		<ul style="list-style: none;">
		<?php foreach($notifications as $notification){?>
		<li> 
		<span class="text-info">
					   <?php 
					   if($this->session->userdata('user_id') == $notification->created_by){
					   echo "You";
					   }else{
					   echo ucwords($this->common_model->get_username_id($notification->created_by));	
					   }?>
					   </span>
		<a href="<?php echo $notification->url;?>"><?php echo $notification->desc;?></a>
		
		<?php 
		
		if($this->session->userdata('user_id') == $notification->user_id){
					   echo "for you";
					   }else{
					   echo ucwords($this->common_model->get_username_id($notification->user_id));	
					   }?>
		
		
		<?php $ago = date("c",strtotime($notification->timestamp));?>
		<a class="muted timeago" title="<?php echo $ago; ?>" ></a>
		</li>	
		<?php }?>
		</ul>
	</div>
</div>


<script>
$(document).ready(function(){
$(".timeago").livequery(function() 
{ 
	$(this).timeago(); 
});	
});
</script>